﻿CREATE proc [dbo].[danhmucTienTe_Them]
@loaitien varchar(255),
@ten nvarchar(255),
@tenle nvarchar(255)
as
if exists(select * from DM_TIenTe  Where loaitien=@loaitien  or ten=@ten    )
begin
select ErrCode=0
end
else
begin
insert into DM_TIenTe (loaitien,ten,tenle)
				values(@loaitien,@ten,@tenle) 
select ErrCode=1
end